<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Grid布局</title>
    <style>
        .parent {
            width: 400px;
            height: 400px;
            margin: 50px auto;
            background-color: cyan;

            display: grid;

            /* 命名网格线创建单元格 */

            /* grid-template-rows: [r1-start] 100px 100px 100px [r3-end r4-start] 100px [r4-end];
            grid-template-columns: [hello] 100px 100px 100px [world] 100px; */

            /* 重复设置 + 默认索引 */
            grid-template-rows: repeat(3, [xxx] 100px [yyy]);
            grid-template-columns: repeat(3, [aaa] 100px [bbb]);
        }

        .child {
            background-color: rgb(148, 235, 238);
        }

        .item01 {
            background-color: red;

            /* 命名 */
            /* grid-row: r1-start / r3-end; */
            /* grid-row: r1-start / r4-start;
            grid-column: hello / world; */

            /* 命名+索引 */
            /* grid-row: xxx 1 / yyy 3; */
            grid-row: xxx 1 / span 3;
            grid-column: aaa 1 / bbb 3;
        }
    </style>
</head>

<body>

    <div class="parent">
        <div class="child item01">1</div>
        <div class="child item02">2</div>
        <div class="child item03">3</div>
        <div class="child item04">4</div>
        <div class="child item05">5</div>
        <div class="child item06">6</div>
    </div>

</body>

</html>